#pragma GCC optimize(2, "Ofast", "inline")
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
#define fi first
#define se second
#define int128 __int128_t
using namespace std;

// 已知
int n, d;
int a[55];

// 未知


signed main()
{
    cin.tie(0)->ios::sync_with_stdio(false);
    cin >> n;
    for (int i = 2;i <= n;++i)
    {
        cin >> d;
        a[i] = a[i - 1] + d;
    }
    for (int i = 1;i <= n;++i)
    {
        for (int j = i + 1;j <= n;++j)
        {
            cout << a[j] - a[i] << ' ';
        }
        cout << endl;
    }
    return 0;
}